package net.jforum.timerTask;

import net.jforum.repository.ForumRepository;
import net.jforum.repository.SummaryRepository;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;

/**
 * @ author  张洋 jackson.zhang@ericsson.com
 * @ version 创建时间 ：Sep 28, 2010  3:08:52 PM
 * @ description : 
 */
public class SummaryTodayTopicCountJob implements StatefulJob{
	private static Logger logger = Logger.getLogger(SummaryTodayTopicCountJob.class);
	public void execute(JobExecutionContext execution) throws JobExecutionException {
		if(logger.isDebugEnabled()){
			logger.debug("start job SummaryTodayTopicCountJob......");
		}
		SummaryRepository.clearCountTodayTopicsAll();//设置所有版块的当日新帖为0
		SummaryRepository.clearCounttAllNewTopicToday();//所有当日帖子数置0
		ForumRepository.getTotalMessages(true);
	}
}
